package com.house.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.house.mapper.HouselistMapper;
import com.house.pojo.Houselist;

import com.house.service.ListService;

@Service
public class ListServiceImpl implements ListService {
	
	@Autowired
	private HouselistMapper listMapper;
	@Override
	public Houselist getListById(int listId) {
		
		Houselist list = listMapper.selectByPrimaryKey(listId);
		
		return list;
	}
	
	@Override
	public List<Houselist> findAllUser(){
	
		List<Houselist> findall = listMapper.selectAll();
		return findall;
		
	}

	@Override
	public int add(Houselist test) {
		System.out.print(test.getHousev());
		return listMapper.insert(test);
	}




}
